<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1，user-scalable=no" />
    <link rel="stylesheet" type="text/css" href="css/reset.css"/>
    <link rel="stylesheet" type="text/css" href="css/login_in.css"/>
    <title>首页</title>

  
</head>
<style>

</style>
<body>



        <div class="login">
            <header>

                    <label for="guanbi">
                            <div class="close">×</div>
                    </label>
                    <input type="text" placeholder="Search">
                    <div class="line"></div>
            </header>

            <div class="middle">
                    <div class="admin">
                        <img src="img/login_tx.png">
                    </div>
                    <p>立即登录</p>
                    <span>忘记密码</span>
            </div>
           

            <section class="box">
                    <div>
                        <input id="input" name="checkbox" type="checkbox">
                        <label for="input" class="label_A"><div>CIMC</div><span>></span>
                            <div class="clear"></div>
                        </label>
                        <div class="content contenta">
                            <div>省广介绍</div>
                            <div>新闻咨询</div>
                        </div>
                    </div>
                  <div>
                      <input id="input_A" name="checkbox" type="checkbox">
                      <label for="input_A"><div>文章</div><span>></span>
                        <div class="clear"></div>
                    </label>
                      <div class="content contenta">
                            <div>省广介绍</div>
                            <div>新闻咨询</div>
                      </div>
                  </div>
              
              
                  <div>
                      <input id="input_B" name="acheckbox" type="checkbox">
                      <label for="input_B"><div>资源</div><span>></span>
                        <div class="clear"></div>
                    </label>
                      <div class="content contentb">
                            <div>省广介绍</div>
                            <div>新闻咨询</div>
                      </div>
                  </div>
              
                  <div>
                    <input id="input_C" name="checkbox" type="checkbox">
                    <label for="input_C"><div>课程</div><span>></span>
                        <div class="clear"></div>
                    </label>
                   
                    <div class="content contentc">
                            <div>省广介绍</div>
                            <div>新闻咨询</div>
                  </div>
                </div>
                  
              </section>
        </div>




</body>

<script>
  
/*动态改变根元素字体大小*/
function recalc() {
	var clientWidth = document.documentElement.clientWidth;
	if(!clientWidth) return;
	document.documentElement.style.fontSize = 40 * (clientWidth / 640) + 'px';
}

function initRecalc() {
	recalc();
	var resizeEvt = 'osrientationchange' in window ? 'orientationchange' : 'resize';
	if(!document.addEventListener) return;
	window.addEventListener(resizeEvt, recalc, false);
	document.addEventListener('DOMContentLoaded', recalc, false);
}
initRecalc();

 console.log("手机viewportWidth=",document.documentElement.clientWidth);
    //获取viewport宽
    var viewportWidth = document.documentElement.clientWidth;
    console.log(document.documentElement.style.fontSize);
</script>

</html>